<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>操作票文件目录</title>
</head>
<body>
	<table align="center">
		<tr>
			<td width="400px">目录：/ 
			<c:forEach items="${pathArray }" var="folderName">
				<a href="javascript:void(0);" onclick="testTry('${folderName }','${absolutePath }','2','<%=basePath%>')">${folderName }</a>/
			</c:forEach>
			</td>
			<td width="360px">
				<input type="button" onclick="upFolder('${absolutePath }','<%=basePath%>')" value="上一级"> 
				<input type="button" onclick="window.location.href='<%=basePath%>czp'" value="根目录">
				<input type="button" onclick="createFolder('${absolutePath }','<%=basePath%>')" value="新建文件夹"> 
				<input type="button" onclick="upload('${absolutePath }','<%=basePath%>')" value="上传文件到此目录"></td>
		</tr>
		<c:forEach items="${fileNameList }" var="file">
		<tr>
			<td align="left">
			<input type="hidden" id="baseUrl" value="<%=basePath%>" />
			<c:if test="${file.isDirectory == 1 }">
				<font color="black">${file.fileName }</font>
			</c:if> 
			<c:if test="${file.isDirectory == 0 }">
				<a style="text-decoration: none" href="javascript:void(0);" onclick="testTry('${file.fileName }','${absolutePath }','1','<%=basePath%>')">${file.fileName}</a>
			</c:if>
			</td>
			<td align="center" width="360px">${file.time }--------------------- 
				<a style="text-decoration: none" href="javascript:void(0);" onclick="deleteFile('${file.fileName }','${absolutePath }','<%=basePath%>')">删除</a>
			</td>
		</tr>
		</c:forEach>
	</table>
</body>
</html>